package com.lab.common.enums;


public enum LabStatus {

    OK(1L, "正常"), DISABLE(2L, "停用"), RENTING(3L, "使用中"), DELETED(4L, "废弃");

    private final Long code;
    private final String info;

    LabStatus(Long code, String info) {
        this.code = code;
        this.info = info;
    }

    public Long getCode() {
        return code;
    }

    public String getInfo() {
        return info;
    }

    public static LabStatus getLabStatus(Long code) {
        for (LabStatus labStatus : LabStatus.values()) {
            if (labStatus.getCode().equals(code)) {
                return labStatus;
            }
        }
        return null;
    }
}

